import { Component, OnInit } from '@angular/core';
import { StorageService } from '../../services/storage.service';

@Component({
  selector: 'app-news',
  templateUrl: './news.component.html',
  styleUrls: ['./news.component.less']
})
export class NewsComponent implements OnInit {

  public title="大家好我是新组建 news";

  public html="<h2>我是html</h2>";

  public bg="green";

  public user:any={
    name:"张三",
    age:20
  }

  public arr:number[]=[1,2,4];

  public orderStatus:number=1;

  public today=new Date();


  constructor(public storage:StorageService) { 
    this.storage.get();
  }

  ngOnInit(): void {
  }

  run():void{
    console.log("fuck");
  }

  keydown(e):void{
    console.log("on keydown");
    if(e.keyCode==13){
      alert("回车");
    }
  }

}
